﻿
namespace WT.Web.DomainServiceSQL
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Data;
    using System.Linq;
    using System.ServiceModel.DomainServices.EntityFramework;
    using System.ServiceModel.DomainServices.Hosting;
    using System.ServiceModel.DomainServices.Server;
    using WT.Web.DataSQL;


    // Implements application logic using the NAVIGATE_WELL_E context.
    // TODO: Add your application logic to these methods or in additional methods.
    // TODO: Wire up authentication (Windows/ASP.NET Forms) and uncomment the following to disable anonymous access
    // Also consider adding roles to restrict access as appropriate.
    // [RequiresAuthentication]
    [EnableClientAccess()]
    public class TAB_WELL_ND_MONTH_DATA_DS : LinqToEntitiesDomainService<NAVIGATE_WELL_E>
    {

        // TODO:
        // Consider constraining the results of your query method.  If you need additional input you can
        // add parameters to this method or create additional query methods with different names.
        // To support paging you will need to add ordering to the 'WTDV_TAB_WELL_ND_MONTH_DATA' query.
        public IQueryable<WTDV_TAB_WELL_ND_MONTH_DATA> GetWTDV_TAB_WELL_ND_MONTH_DATA()
        {
            return this.ObjectContext.WTDV_TAB_WELL_ND_MONTH_DATA;
        }

        public IQueryable<WTDV_TAB_WELL_ND_MONTH_DATA> GetWTDV_TAB_WELL_ND_MONTH_DATA_BY_PARAM(decimal id_well, int year, int month)
        {
            return this.ObjectContext.WTDV_TAB_WELL_ND_MONTH_DATA.Where(t => t.ID_WELL == id_well && t.WT_MONTH.Year == year && t.WT_MONTH.Month == month);
        }

        public IQueryable<WTDV_TAB_WELL_ND_MONTH_DATA> GetWTDV_TAB_WELL_ND_MONTH_DATA_BY_PARAM_YEAR(decimal id_well, int year)
        {
            return this.ObjectContext.WTDV_TAB_WELL_ND_MONTH_DATA.Where(t => t.ID_WELL == id_well && t.WT_MONTH.Year == year);
        }
    }
}


